From: Jonas Dreßler Date: Thu, 14 Nov 2019 07:37:25 +0000 (+0100) Subject: st/scroll-view: Don't emit superfluous style-changed events on children X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~574^2^2~169 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=85ffb969246ef37c0c44fc9a01a8ed5832423dd0;p=gnome-shell.git st/scroll-view: Don't emit superfluous style-changed events on children Since we correctly call the `style_changed` vfunc superclass at the end of our own function anyway, the style changes will get propagated to the children of the scrollView inside `st_widget_real_style_changed` anyway. So remove those unneeded and quite expensive (because they cause the theme node to be regenerated) calls to `st_widget_style_changed`. Part-of: --- diff --git a/src/st/st-scroll-view.c b/src/st/st-scroll-view.c index 606701565..fe7f3313e 100644 --- a/src/st/st-scroll-view.c +++ b/src/st/st-scroll-view.c @@ -752,7 +752,6 @@ static void st_scroll_view_style_changed (StWidget *widget) { StScrollView *self = ST_SCROLL_VIEW (widget); - StScrollViewPrivate *priv = self->priv; StThemeNode *theme_node = st_widget_get_theme_node (widget); gdouble vfade_offset = st_theme_node_get_length (theme_node, "-st-vfade-offset"); @@ -765,9 +764,6 @@ st_scroll_view_style_changed (StWidget *widget) .right = hfade_offset, }); - st_widget_style_changed (ST_WIDGET (priv->hscroll)); - st_widget_style_changed (ST_WIDGET (priv->vscroll)); - ST_WIDGET_CLASS (st_scroll_view_parent_class)->style_changed (widget); }